﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Model.ViewModels.RoomCrudAdminVm>" %>
<%@ Import Namespace="Web.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Prostorije
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Uredi prostoriju</h2>

    <% Html.EnableClientValidation(); %>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Forma za unos podataka</legend>
            
            <div class="editor-label">
                <%: Html.Label("Grupa") %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RoomGroup) %>
                <%: Html.ValidationMessageFor(model => model.RoomGroup) %>
            </div>
            
            <div class="editor-label">
                <%: Html.Label("Oznaka") %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Mark) %>
                <%: Html.ValidationMessageFor(model => model.Mark) %>
            </div>
            
            <div class="editor-label">
                <%: Html.Label("Tip") %>
            </div>
            <div class="editor-field">
                <%: Html.EnumDropDownListFor(model => model.Type, "-- odaberite tip sobe --", new {} )%>
                <%: Html.ValidationMessageFor(model => model.Type) %>
            </div>
            
            <div class="editor-label">
                <%: Html.Label("Naziv") %>
            </div>
            <div class="editor-field">                
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            <div class="editor-label">
                <%: Html.Label("Površina") %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Area) %>
                <%: Html.ValidationMessageFor(model => model.Area) %>
            </div>
            
            <p>
                <input type="submit" value="Spremi promjene" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Povratak na pregled prostorija", "Rooms", new { id = ViewData["ApartmentId"] })%>
    </div>

</asp:Content>
